<?xml version = '1.0' encoding = 'UTF-8'?>
<HBRRepo><variables><variable name="OQP_Year" type="member" usage="const" id="1" product="Planning"><property name="application">SalesPln</property><property name="dimension">Years</property><property name="dimensionInputMode">name</property><property name="prompt_text">LABEL_QTP_SLS_PLAN_PRMPT_YEAR</property><property name="scope">ruleset</property><property name="seeded">true</property><value/></variable></variables><rulesets/><rules><rule id="1" name="Account Segment Scores" product="Planning"><property name="application">SalesPln</property><property name="plantype">OEP_QTP</property><variable_references><variable_reference name="OQP_Year" id="1"><property name="application">SalesPln</property><property name="hidden">false</property><property name="rule_name">Account Segment Scores</property><property name="seq">1</property><property name="type">3</property><property name="useAsOverrideValue">false</property><property name="validation_value">FY19</property></variable_reference></variable_references><script type="groovy">'''
FIX ({OQP_Year},"OEP_No Scenario","OEP_No Version","No Currency",BegBalance)
   @CHILDREN("Segment");
   FIX(@ICHILDREN("Segment"),@IDESCENDANTS("OEP_Total Territory"),@IDESCENDANTS("OEP_Total Accounts"))
      CLEARDATA "No Product";
   ENDFIX
ENDFIX
FIX ({OQP_Year},"OEP_No Scenario","OEP_No Version","No Currency",BegBalance)
   FIX("No Product","No Sales Channel",@IDESCENDANTS("OEP_All Territory") AND @LEVMBRS("Territory",0),@IDESCENDANTS("OEP_All Accounts") AND @LEVMBRS("Accounts",0))
   "Number of Employees" (
   IF ("Number of Employees" &lt; 100)
      "Employee Score" = "LT100"->"No Territory"->"No Accounts";
   ELSEIF ("Number of Employees" >= 100 AND "Number of Employees" &lt; 1000)
      "Employee Score" = "LT1000"->"No Territory"->"No Accounts";
   ELSEIF ("Number of Employees" >= 1000 AND "Number of Employees" &lt; 10000)
      "Employee Score" = "LT10000"->"No Territory"->"No Accounts";
   ELSEIF ("Number of Employees" >= 10000 AND "Number of Employees" &lt; 50000)
      "Employee Score" = "LT50000"->"No Territory"->"No Accounts";
   ELSEIF ("Number of Employees" >= 50000 AND "Number of Employees" &lt; 100000)
      "Employee Score" = "LT100000"->"No Territory"->"No Accounts";
   ELSEIF ("Number of Employees" >= 100000)
      "Employee Score" = "GT100000"->"No Territory"->"No Accounts";
   ENDIF
   )
   "Organization Size" (
   IF ("Organization Size" == [[OrganizationSize.Very_Large]])
      "Org Score" = "Very Large"->"No Territory"->"No Accounts";
   ELSEIF ("Organization Size" == [[OrganizationSize.Large]])
      "Org Score" = "Large"->"No Territory"->"No Accounts";
   ELSEIF ("Organization Size" == [[OrganizationSize.Medium]])
      "Org Score" = "Medium"->"No Territory"->"No Accounts";
   ELSEIF ("Organization Size" == [[OrganizationSize.Small]])
      "Org Score" = "Small"->"No Territory"->"No Accounts";
   ELSEIF ("Organization Size" == [[OrganizationSize.Very_Small]])
      "Org Score" = "Very Small"->"No Territory"->"No Accounts";
   ENDIF
   )
   "Annual Revenue" (
   IF ("Annual Revenue" &lt; 10000000)
      "Revenue Score" = "LT10M"->"No Territory"->"No Accounts";
   ELSEIF ("Annual Revenue" >= 10000000 AND "Annual Revenue" &lt; 100000000)
      "Revenue Score" = "LT100M"->"No Territory"->"No Accounts";
   ELSEIF ("Annual Revenue" >= 100000000 AND "Annual Revenue" &lt; 500000000)
      "Revenue Score" = "LT500M"->"No Territory"->"No Accounts";
   ELSEIF ("Annual Revenue" >= 500000000 AND "Annual Revenue" &lt; 1000000000)
      "Revenue Score" = "LT1000M"->"No Territory"->"No Accounts";
   ELSEIF ("Annual Revenue" > 1000000000 AND "Annual Revenue" &lt; 5000000000)
      "Revenue Score" = "LT5000M"->"No Territory"->"No Accounts";
   ELSEIF ("Annual Revenue" > 5000000000)
      "Revenue Score" = "GT5000M"->"No Territory"->"No Accounts";
   )
   ENDFIX
   SET AGGMISSG ON;
   AGG ("Territory","Sales Channel","Accounts","Product");
   "Employee Score" = @ROUND("Employee Score" / "Employee Count",2);
   "Revenue Score" = @ROUND("Revenue Score" / "Revenue Band",2);
   "Org Score" = @ROUND("Org Score" / "Org Size",2);
   FIX("No Product","No Sales Channel",@IDESCENDANTS("OEP_All Territory") AND @LEVMBRS("Territory",0),@IDESCENDANTS("OEP_All Accounts") AND @LEVMBRS("Accounts",0))
      "Account Segment" (
      IF ("Score" &lt;= "Mid Market"->"No Territory"->"No Accounts")
         "Account Segment" = [[AccountSegment.Mid_Market]];
         "Mid Market" = 1;
      ELSEIF ("Score" > "Mid Market"->"No Territory"->"No Accounts" AND "Score" &lt;= "Commercial"->"No Territory"->"No Accounts")
         "Account Segment" = [[AccountSegment.Commercial]];
         "Commercial" = 1;
      ELSEIF ("Score" > "Commercial"->"No Territory"->"No Accounts" AND "Score" &lt;= "Enterprise"->"No Territory"->"No Accounts")
         "Account Segment" = [[AccountSegment.Enterprise]];
         "Enterprise" = 1;
      ELSEIF ("Score" > "Enterprise"->"No Territory"->"No Accounts" AND "Score" &lt;= "Key Account"->"No Territory"->"No Accounts")
         "Account Segment" = [[AccountSegment.Key_Account]];
         "Key Account" = 1;
      ELSEIF ("Score" > "Key Account"->"No Territory"->"No Accounts")
         "Account Segment" = [[AccountSegment.Global]];
         "Global" = 1;
      ENDIF
      )
   ENDFIX
   FIX (@CHILDREN("Segment"))
      AGG ("Territory","Sales Channel","Accounts","Product");
   ENDFIX
ENDFIX
FIX ({OQP_Year},"OEP_No Scenario","OEP_No Version","No Currency",BegBalance)
   FIX("No Product","No Sales Channel",@IDESCENDANTS("OEP_Total Territory"),"No Entity",@IDESCENDANTS("OEP_Total Accounts"),"No Accounts")
      DATACOPY "Account Segment" to "Planned Segment";
   ENDFIX
ENDFIX
FIX ({OQP_Year},"OEP_No Scenario","No Currency",BegBalance)
   DATACOPY "OEP_No Version" to "AccountPlan";
ENDFIX
'''


</script></rule></rules><components/><deployobjects><deployobject product="2" application="salespln" plantype="oep_qtp" obj_id="1" obj_type="1" name="ACCOUNT SEGMENT SCORES"/></deployobjects></HBRRepo>